package com.fqxl.labour.controller;

import com.alibaba.fastjson2.JSONObject;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/user/user")
@Api(tags = "C端用户相关接口")
@Slf4j
public class UserController {

        RestTemplate restTemplate = new RestTemplate();

        JSONObject forObject = restTemplate.getForObject("https://api.weixin.qq.com/sns/jscode2session?" +
                "appid=" + "你的appid" +
                "&secret=" + "你的secret" +
                "&js_code= " + "前端获取的jscode" +
                "&grant_type=authorization_code", JSONObject.class);


}

